/**
 * @description  Campisi（归因分析）
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Row, Col } from 'antd';
import { FirstHeaderC, SecondHeaderC } from '../../../../comps';
import DecomposeIncome from '../publicComponent/decomposeIncome'; // 收益分解
import ExcessTrend from '../publicComponent/excessTrend'; // 超额趋势
import RevisionPeriod from './revisionPeriod'; // 按修正久期
import BondType from './bondType'; // 按债券类别
import AttributeInfo from '../publicComponent/attributeInfo'; // 归因明细

class Campisi extends PureComponent {
  constructor() {
    super();
    this.state = {};
  }

  render() {
    const { args } = this.props;

    return (
      <div style={{ marginTop: '20px' }}>
        <SecondHeaderC title='归因概览' />
        <div style={{ marginBottom: '20px' }}>
          <Row gutter={16}>
            <Col span={12}>
              <DecomposeIncome args={args} />
            </Col>
            <Col span={12}>
              <ExcessTrend args={args} />
            </Col>
          </Row>
        </div>
        <SecondHeaderC title='维度统计' />
        <div style={{ marginBottom: '20px' }}>
          <Row gutter={16}>
            <Col span={12}>
              <RevisionPeriod args={args} />
            </Col>
            <Col span={12}>
              <BondType args={args} />
            </Col>
          </Row>
        </div>
        <SecondHeaderC title='归因明细' />
        <div>
          <AttributeInfo args={args} />
        </div>
      </div>
    );
  }
}
export default connect(({ attributionAnalysisM }) => ({
  attributionAnalysisM,
}))(Campisi);
